#!/bin/bash

# IPS SERVERS
IP="10.31.17.1"
BROADCAST="10.31.17.63"


# DIRECCIONES DE GATEWAYS
H104="10.31.17.2"

# MASCARAS DE RED
Netmask26="255.255.255.192"

./limpiezaInterfaces.sh
interfaz=`ifconfig | egrep "eth." -o | head -1`

#Desactivo el ruteo del sistema operativo
echo "0" >> /proc/sys/net/ipv4/ip_forward

ifconfig $interfaz $IP broadcast $BROADCAST netmask $Netmask26

route add -net 0.0.0.0 netmask 0.0.0.0 dev $interfaz gw $H104

cp inetd.conf.ftp /etc/inetd.conf
/etc/init.d/openbsd-inetd restart

#./DNStigre.sh
